<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<script>
function addorder()
{
	$('#addstorageform').modal('show');	
}
function showExpressForm(type){
	//var str = selectallpro();
    var submit_act = new Array();
    submit_act['UPS'] = "/order/ajaxbutton?op=saveexpress", submit_act['DHL'] = "/order/DHLexpress"
        , submit_act['UBI'] = "/order/UBIexpress", submit_act['CNE'] = "/order/CNEexpress";
    $("#expressOrderForm").attr("action", submit_act[type]);
	$("#type").val(type);
    $('#expressform').modal('show');
}
   
</script>
 
<title>交运列表</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">{{$expressType}}交运列表</h1>
      <span class="pagedesc"></span>
       <div class="menulist">
        <ul class="profile_summary">
        {{if $orderType==1}}
          <li> <a href="javascript:void(0)" onClick="addorder()" class=""><span>顺丰交运</span></a></li>
          <li><a href="/doit/sfexpress/0/0"  target="_blank"><span>批量交运顺丰</span></a></li>
       {{else}}
            <li> <a href="javascript:showExpressForm('{{$expressType}}');" class=""><span>{{$expressType}}交运</span></a></li>
          	<li><a href="/order/{{$expressType}}express"  target="_blank"><span>{{$expressType}}批量交运</span></a></li>
       {{/if}}
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
          <!--搜索栏-->
           <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    <form class="stdform stdform2" method="get" action="/order/sfexpress">
    <input type="hidden" name="orderType" id="orderType" value="{{$orderType}}" >
      <div class="tableoptions"> 交运时间：
       <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       关键词: <input type="text" name="other" id="other" class="width100" value="{{$other}}" placeholder="订单号或运单号" />
       &nbsp;
      订单状态:
                           <select name="statusst" class="selection" style="width:100px;">
                            <option value=""  selected>请选择</option>
                                <option value="1" {{if $statusst==1}} selected{{/if}}>已支付</option>
                                <option value="2" {{if $statusst==2}} selected{{/if}}>配货中</option>
                                <option value="3" {{if $statusst==3}} selected{{/if}}>已完成</option>
                            </select>
                       <select name="isexe" class="selection" style="width:100px;">
                <option value=""  selected>交运状态</option>
                    <option value="1" {{if $isexe==1}} selected{{/if}}>交运成功</option>
                    <option value="2" {{if $isexe==2}} selected{{/if}}>交运失败</option>
                    <option value="3" {{if $isexe==3}} selected{{/if}}>未交运</option>
                </select>     
&nbsp;
        <button class="btn btn_orange btn_search radius50">Search</button>
         &nbsp;  &nbsp; 
         <a href="?isexe=1">{{if $isexe==1}}<font color="red">交运成功</font>{{else}}交运成功{{/if}}</a>
        &nbsp;  &nbsp;
         <a href="?isexe=2">{{if $isexe==2}}<font color="red">交运失败</font>{{else}}交运失败{{/if}}</a>
         &nbsp;  &nbsp;
    	 <a href="?isexe=3">{{if $isexe==3}}<font color="red">未交运</font>{{else}}未交运{{/if}}</a>
        &nbsp;&nbsp;&nbsp;
        <a href="javascript:void(0)" onClick="moreopenMailNoUrl(1,{{$orderType}})" class="btn btn2 btn_help"><span>打印标签</span></a>
        &nbsp;&nbsp;
        {{if $orderType==1}}
        <a href="javascript:void(0)" onClick="moreopenMailNoUrl(2,{{$orderType}})" class="btn btn2 btn_help"><span>打印发票</span></a>
        &nbsp;&nbsp;
        {{/if}}
         &nbsp;&nbsp;
        <a href="javascript:void(0)" onClick="Dodistribution()" class="btn btn2 btn_help"><span>标配货</span></a>
         &nbsp;&nbsp; &nbsp;&nbsp;
         <a href="javascript:void(0)" onClick="repeatexpress(1)" class="btn btn2 btn_help"><span>重新交运</span></a>
      </div>
    </form>
    <!--搜索栏结束-->

             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr>
               <th class="head0"><input name="allchk" id="allchk" type="checkbox" onClick="allSelect('ppid[]')"></th>
                <th class="head1">订单号</th>
                <th class="head1">状态</th>
                <th class="head1">客户名称</th>
                <th class="head1">来源平台</th>
                <th class="head1">国家</th>
                <th class="head1">操作人</th>
                <th class="head1">状态</th>
                <th class="head1">运单号</th>
                 <th class="head1">交运时间</th>
                 <th class="head1">操作</th>
           
              </tr>
            </thead>
          
             {{foreach from=$orderlist item=detail key=key}}
                <tr>
                 <td><input name="ppid[]" type="checkbox" value="{{$detail.id}}"></td>

                <td>
                {{if $detail.isform==1}}
                <a  href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{$detail.orderID}}" target="_blank">{{$detail.orderID}}</a>
                {{else}}
                 <a  href="/orderlist/orderlist?kw={{$detail.orderID}}" target="_blank">{{$detail.orderID}}</a>
                {{/if}}
                </td>
                <td>{{$detail.statusst}}</td>
                <td>{{$detail.customerid}}</td>
                <td>{{$detail.customertype}}</td>
                <td>{{$detail.customerqq}}</td>
                <td>{{$detail.createUser}}</td>
                <td>{{if $detail.isexe==1}}交运完成{{/if}}{{if $detail.isexe==2}}交运失败{{/if}}{{if $detail.isexe==0}}未交运{{/if}}</td>
                <td>{{if $detail.isexe==1}}{{$detail.mailNo}}{{/if}}
                {{if $detail.isexe==2}}<span title="{{$detail.exememo}}">{{$detail.exememo|getstr:16:0}}</span>{{/if}}
                {{if $detail.isexe==0}}{{$detail.exememo}}{{/if}}</td>
                <td>{{$detail.mailinstime}}</td>

                <td> {{if $detail.isexe==2}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')">删除</a>{{/if}}  {{if $detail.isexe==0}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')" >删除</a>{{/if}}
                
                 {{if $managers || in_array('101',$showpower)}}{{if $detail.isexe==1}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')" >删除</a> | {{/if}}{{/if}}
                {{if $detail.isexe==1}}<!--<a href="{{$detail.printUrl}}" target="_blank">标签A</a>&nbsp;&nbsp;|&nbsp;&nbsp;--><a href="javascript:void(0)" onClick="openMailNoUrl({{$detail.id}},{{$detail.orderType}})" target="_blank">标签</a>｜<a href="{{$detail.invoiceUrl}}" target="_blank">发票</a>{{/if}}</td>
                </tr>
              {{/foreach}}
            
            
            
          </table>
          
           <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
         </div></div>
<!-- 模态框（Modal）添加商品属性 -->
<form action="/datareport/ajaxbutton?op=savemabangorder"  method="post" name="attributeform" id="attributeform" >
  <div class="modal fade" id="addstorageform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="returnaddattributeform"> 添加马帮订单 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100">马帮订单号： </td>
              <td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
            </tr>
          
             <tr>
              <td>注意： </td>
              <td align="left">一行一个订单号</td>
            </tr>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmit('attributeform','addstorageform')"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>

<!--CNE,UBI,DHL交运表单-->
<form action="/order/DHLexpress"  method="post" name="expressOrderForm" id="expressOrderForm" target="_blank">
<input type="hidden" name="type" id="type">
<input type="hidden" name="course" value="express_send">
  <div class="modal fade" id="expressform" tabindex="-1" role="dialog" aria-labelledby="expressform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sprintform"> 待交运订单编号  </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100">订单号： </td>
              <td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
            </tr>
             <tr>
              <td>注意： </td>
              <td align="left" style="color:#999">一行一个订单号</td>
            </tr>
          </table>
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary"> 提交 </button>
            <button type="button" class="btn btn-default" 
               data-dismiss="modal" style="display:none"> 关闭 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
</form>
  <div id="goToTop" style="display:none"><a href="javascript:;">TOP</a></div>
   
</body>
</html>